#!/usr/bin/env sh
#work directory 
#$HOME/git
cur_dir=`pwd`

tgt_dir=(git r90)
ctags_flag='-V --languages=c++ --langmap=c++:+.inl -h +.inl --c++-kinds=+p --fields=+aiKSzn --extra=+qf --exclude=.svn--exclude=.git --exclude=*.bak --exclude=tmp'

if [ "$1x" == "${tgt_dir[0]}x" ] ; then

work_dir=$HOME/git
cd $work_dir

ctags -R $ctags_flag --exclude=r90  --exclude=hdocs --exclude=tarball ./

cd $cur_dir

elif [ "$1x" == "${tgt_dir[1]}x" ] ; then

work_dir=$HOME/git/r90
cd $work_dir
 ctags -R $ctags_flag --exclude=r90 --exclude=hdocs --exclude=tarball --exclude=gtest --exclude=SmartGuys --exclude=R9-cloud ./

cd $cur_dir

elif [ "$1"x = ""x ] || [ "$1"x="h"x ] || [ "$1"x="help"x ] ; then

    echo "usage: $0 ${tgt_dir[*]}"

fi

